function search_name() {
    let business = $("#business").val();
    window.location = "/hire/job/company/company?name=" + business;
}

function toinfo(obj) {
    let cid = obj.children[1].children[0].value;
    // console.log(cid)
    window.location = "/hire/job/company/companyinfo?id=" + cid;
}

function findbus(obj) {
    let business = $("#business").val();
    let financing = obj.innerText
    if (financing == ("全部")) {
        financing = ""
        window.location = "/hire/job/company/company?financing=" + financing+"&name="+business;
    } else {
        window.location = "/hire/job/company/company?financing=" + financing+"&name="+business;
    }
    // window.location="/hire/job/company/company?financing="+financing;
}

function countperson(obj) {
    let business = $("#business").val();
    let num = obj.innerText
    if (num == ("全部")) {
        num = ""
        window.location = "/hire/job/company/company?num=" + num+"&name="+business;
    } else {
        window.location = "/hire/job/company/company?num=" + num+"&name="+business;
    }
    // window.location="/hire/job/company/company?financing="+financing;
}

function searchcity(obj) {
    let business = $("#business").val();
    let city=obj.innerText;
    if(city == ("全国")){
        city = ""
        window.location="/hire/job/company/company?city="+city+"&name="+business;
    }   else {
        console.log(city)
        window.location="/hire/job/company/company?city="+city+"&name="+business;
    }
}

function searchAllCity() {
    // let province=obj.children[0].value;
    // let city=obj.children[0].value;
    // let district=obj.children[0].value
    // let city=document.getElementById("address").name;
    // let province=
    let business = $("#business").val();
    let province=document.getElementById("city1").children[1].children[1].children[0].innerText;
    let city = document.getElementById("city1").children[1].children[1].children[2].innerText;
    let district = document.getElementById("city1").children[1].children[1].children[4].innerText;
    // console.log(city)
    window.location="/hire/job/company/company?province="+province+"&city="+city+"&district="+district+"&name="+business;
}

